// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::AccessApproval].
#[async_trait::async_trait]
pub trait AccessApproval: std::fmt::Debug + Send + Sync {
    async fn list_approval_requests(
        &self,
        req: crate::model::ListApprovalRequestsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListApprovalRequestsResponse>>;

    async fn get_approval_request(
        &self,
        req: crate::model::GetApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>>;

    async fn approve_approval_request(
        &self,
        req: crate::model::ApproveApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>>;

    async fn dismiss_approval_request(
        &self,
        req: crate::model::DismissApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>>;

    async fn invalidate_approval_request(
        &self,
        req: crate::model::InvalidateApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>>;

    async fn get_access_approval_settings(
        &self,
        req: crate::model::GetAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalSettings>>;

    async fn update_access_approval_settings(
        &self,
        req: crate::model::UpdateAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalSettings>>;

    async fn delete_access_approval_settings(
        &self,
        req: crate::model::DeleteAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn get_access_approval_service_account(
        &self,
        req: crate::model::GetAccessApprovalServiceAccountMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalServiceAccount>>;
}

/// All implementations of [super::AccessApproval] also implement [AccessApproval].
#[async_trait::async_trait]
impl<T: super::AccessApproval> AccessApproval for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn list_approval_requests(
        &self,
        req: crate::model::ListApprovalRequestsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListApprovalRequestsResponse>> {
        T::list_approval_requests(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_approval_request(
        &self,
        req: crate::model::GetApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>> {
        T::get_approval_request(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn approve_approval_request(
        &self,
        req: crate::model::ApproveApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>> {
        T::approve_approval_request(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn dismiss_approval_request(
        &self,
        req: crate::model::DismissApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>> {
        T::dismiss_approval_request(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn invalidate_approval_request(
        &self,
        req: crate::model::InvalidateApprovalRequestMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ApprovalRequest>> {
        T::invalidate_approval_request(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_access_approval_settings(
        &self,
        req: crate::model::GetAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalSettings>> {
        T::get_access_approval_settings(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_access_approval_settings(
        &self,
        req: crate::model::UpdateAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalSettings>> {
        T::update_access_approval_settings(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_access_approval_settings(
        &self,
        req: crate::model::DeleteAccessApprovalSettingsMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_access_approval_settings(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_access_approval_service_account(
        &self,
        req: crate::model::GetAccessApprovalServiceAccountMessage,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::AccessApprovalServiceAccount>> {
        T::get_access_approval_service_account(self, req, options).await
    }
}
